<template>
	<view class="container serviceItems">
		<u-navbar title="服务项目"  safeAreaInsetTop fixed placeholder :autoBack="true" :borderBottom="false"></u-navbar>
		<view class="search-container"
			style="width: 686rpx; border-radius: 15px;margin: auto; padding-left: 24rpx;">
			<!-- <uni-data-picker v-slot:default="{data, error}" v-model="selectedRegion" :localdata="regions"
				popup-title="请选择城市" @nodeclick="onRegionNodeClick" @change="onSelectedRegionChange">
				<view v-if="error">
					<text>！</text>
					<u-icon style="margin-left: 8rpx;" name="arrow-down-fill" color="#666"></u-icon>
				</view>
				<view v-else-if="data.length" class="selected">
					<text>{{data[1].text}}</text>
					<u-icon style="margin-left: 8rpx;" size="20" name="arrow-down-fill" color="#666"></u-icon>
				</view>
				<view v-else>
					<text>请选择</text>
					<u-icon style="margin-left: 8rpx;" size="20" name="arrow-down-fill" color="#666"></u-icon>
				</view>
			</uni-data-picker> -->
			<view class="selected">
				<text>南充</text>
				<u-icon style="margin-left: 8rpx;" size="20" name="arrow-down-fill" color="#666"></u-icon>
			</view>
			<view class="search-line1" style="margin-left: 20rpx;"></view>
			<input placeholder="搜索预设文案" v-model="searchVal" />
			<image style="width: 40rpx; height: 40rpx; margin-right: 20rpx;"
				src="/static/home/home-search@2x.png">
			</image>
		</view>
		<view class="u-flex" style="flex: 1; align-items: flex-start; padding-top: 20rpx;">
			<view class="left1" style="height: 100%; background: rgba(245, 245, 245, 1);">
				<view @click="leftItemClick(index)" v-for="(item,index) in leftArr" class="leftItem1" :class="leftIndex == index?'leftItem1_sel':''">
					{{item.name}}
				</view>
			</view>
			<view class="right1" style="margin-left: 24rpx;">
				<view v-for="(item,index) in rightArr" :key="index">
					<view style="margin-bottom: 24rpx; padding-top: 24rpx; font-weight: 500;color: #333333; font-size: 32rpx;">{{item.name}}</view>
					<view class="u-flex" style="flex-direction: row; flex-wrap: wrap;">
						<view @click="rightItemClick(item1)" v-for="(item1,index1) in  item.list" :key="index1" class="u-flex-col" style="width: 154rpx; margin-right: 24rpx; font-size: 0px; justify-content: flex-start; align-items: center;">
							<image style="width: 112rpx; height: 112rpx;background: rgb(230, 230, 230);"></image>
							<view style="color: rgba(153, 153, 153, 1); font-size: 24rpx; margin-top: 12rpx; margin-bottom: 26rpx; font-weight: 500;">{{item1.name}}</view>
							
						</view>
					</view>
				</view>
				
			</view>
			
			
		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				searchVal: '',
				dataList:[],
				leftIndex:0,
				leftArr:[{name:'家具服务'},{name:'家电服务'},{name:'电路灯具'},{name:'清洗保洁'},{name:'服务分类'}],
				rightArr:[{name:'家具安装',list:[{name:'沙发组装'},{name:'沙发组装'},{name:'沙发组装'},{name:'沙发组装'},{name:'沙发组装'},{name:'宠物家具 组装'},{name:'宠物家具 组装'},{name:'宠物家具 组装'}]},
				{name:'家具拆卸',list:[{name:'柜类组装'},{name:'柜类组装3'},{name:'柜类组装4'},{name:'柜类组装'},{name:'柜类组装0'},{name:'柜类组装1'},{name:'柜类组装'},{name:'柜类组装'},{name:'柜类组装'},{name:'柜类组装'},{name:'柜类组装'},{name:'柜类组装'},{name:'柜类组装'}]}]

			}
		},
		methods: {
			queryList(){
				
			},
			leftItemClick(index){
				this.leftIndex = index
			},
			rightItemClick(item){
				uni.navigateTo({
					url:'/pages/home/serviceItems2'
				})
				
			}
			

		}
	}
</script>

<style lang="scss">
	.search-container {
		display: flex;
		flex-direction: row;
		justify-content: flex-start;
		align-items: center;
		border: 1rpx solid #0BB1EF;
		border-radius: 24rpx;
		height: 76rpx;

		background-color: rgba(11, 177, 239, 0.10);


		input {
			font-size: 30rpx;
			padding: 0 20rpx 0 0;
			flex: 1;
			margin-left: 20rpx;

		}

		text {
			font-size: 32rpx;
			font-weight: 600;
		}

		.search-line1 {
			width: 1px;
			height: 32rpx;
			background: #D9D9D9;
		}
	}
	.serviceItems{
		.leftItem1{
			width: 184rpx;
			height: 92rpx;
			line-height: 92rpx;
			text-align: center;
			color: rgba(102, 102, 102, 1);
			font-weight: 500;
			font-size: 28rpx;
		}
		.leftItem1_sel{
			background-color: rgba(255, 255, 255, 1);
			color: rgba(11, 177, 239, 1);
			font-size: 32rpx;
			font-weight: 600;
		}
	}
</style>